package com.qq.lht.androidgame24;

import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //View.SYSTEM_UI_FLAG_HIDE_NAVIGATION隐藏虚拟按键
        //View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY黏性全屏沉浸
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
        }
        setContentView(new MyView(this));
    }
}
